package com.clz.hyperit.service;

import java.util.List;

import com.clz.hyperit.entity.Answer;
import com.clz.hyperit.entity.Question;
import com.clz.hyperit.vo.Answer_User;
import com.clz.hyperit.vo.PageInfo;
import com.clz.hyperit.vo.Question_User;

public interface QuestionService {

	public Integer saveQuestion( Question question, String tag);

	public Question findOneQuestion(Integer question_id);

	public void updateQuestion(Question question);
	//分页查询所有问题
	public List<Question_User> findAll(PageInfo pageInfo);
	//分页查询个人的所有提问
	public List<Question_User> findPersonQuestion(PageInfo pageInfo,
			Integer userdetail_id);
	//删除问题
	public void deleteQuestion(Question question);
	//回复答案
	public Integer saveAnswer(Answer answer);
	//获得某个Answer
	public Answer getOneAnswer(Integer id);
	//删除答案
	public void deleteAnswer(Answer answer, Question question);
	//获得所有答案
	public List<Answer> getAnswer(PageInfo pageInfo, Integer question_id);
	//设置最佳答案
	public Answer saveBestAnswer(Integer answer_id, Integer question_id);
	//排序-采纳或者未采纳
	public List<Question_User> findQuestionByAccept(PageInfo pageInfo,
			Integer is_accept);

	public List<Question_User> getQuestionByAnswer(PageInfo pageInfo);

	public List<Question_User> getQuestionByRead(PageInfo pageInfo);

	public List<Question_User> SearchQuestion(PageInfo pageInfo, String search);

}
